package com.xvheng.module.backendApi.service.impl;

import java.util.List;
import com.xvheng.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xvheng.module.backendApi.mapper.ConfirmLogMapper;
import com.xvheng.module.backendApi.domain.ConfirmLog;
import com.xvheng.module.backendApi.service.IConfirmLogService;

/**
 * 核销记录Service业务层处理
 * 
 * @author xvheng
 * @date 2025-01-03
 */
@Service
public class ConfirmLogServiceImpl implements IConfirmLogService 
{
    @Autowired
    private ConfirmLogMapper confirmLogMapper;

    /**
     * 查询核销记录
     * 
     * @param id 核销记录主键
     * @return 核销记录
     */
    @Override
    public ConfirmLog selectConfirmLogById(String id)
    {
        return confirmLogMapper.selectConfirmLogById(id);
    }

    /**
     * 查询核销记录列表
     * 
     * @param confirmLog 核销记录
     * @return 核销记录
     */
    @Override
    public List<ConfirmLog> selectConfirmLogList(ConfirmLog confirmLog)
    {
        return confirmLogMapper.selectConfirmLogList(confirmLog);
    }

    /**
     * 新增核销记录
     * 
     * @param confirmLog 核销记录
     * @return 结果
     */
    @Override
    public int insertConfirmLog(ConfirmLog confirmLog)
    {
        confirmLog.setCreateTime(DateUtils.getNowDate());
        return confirmLogMapper.insertConfirmLog(confirmLog);
    }

    /**
     * 修改核销记录
     * 
     * @param confirmLog 核销记录
     * @return 结果
     */
    @Override
    public int updateConfirmLog(ConfirmLog confirmLog)
    {
        confirmLog.setUpdateTime(DateUtils.getNowDate());
        return confirmLogMapper.updateConfirmLog(confirmLog);
    }

    /**
     * 批量删除核销记录
     * 
     * @param ids 需要删除的核销记录主键
     * @return 结果
     */
    @Override
    public int deleteConfirmLogByIds(String[] ids)
    {
        return confirmLogMapper.deleteConfirmLogByIds(ids);
    }

    /**
     * 删除核销记录信息
     * 
     * @param id 核销记录主键
     * @return 结果
     */
    @Override
    public int deleteConfirmLogById(String id)
    {
        return confirmLogMapper.deleteConfirmLogById(id);
    }
}
